package com.dtp.core.support.wrapper;

import com.dtp.core.support.runnable.MdcRunnable;

/**
 * MDC增强任务
 *
 * @author yanhom
 * @since 1.0.8
 *
 * @remark muse
 **/
public class MdcTaskWrapper implements TaskWrapper {

    private static final String NAME = "mdc"; // 任务包装器名称

    @Override
    public String name() {return NAME;}

    /** 包装Runnable，返回MdcRunnable实例对象 */
    @Override
    public Runnable wrap(Runnable runnable) {
        return MdcRunnable.get(runnable);
    }
}
